package dhy.com.tomcat.three.response.utils;

import java.io.BufferedOutputStream;
import java.io.PrintWriter;
import java.io.Writer;

/**
 * @author 大忽悠
 * @create 2022/3/10 17:10
 */
public class ResponseWriter extends PrintWriter {
    public ResponseWriter(Writer out) {
        super(out);
    }

    public ResponseWriter(BufferedOutputStream bufferedOutputStream, boolean autoFlush) {
        super(bufferedOutputStream,autoFlush);
    }

    @Override
    public void print(String x) {
        super.print(x);
        //手动刷新
        super.flush();
    }
}
